<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
?>

<!DOCTYPE html>
<html>
<head>
  <title></title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <meta name="format-detection" content="telephone=no" />
  <link href="/css/style.css" rel="stylesheet">
  <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  
</head>
<body >
		<div class="registration-form">
        

        



 <?php $form = ActiveForm::begin(['id'=>'form111']); ?>




        
            <div style="" id="forum" class="view">
    <div class="wapper6 wapper">
        <img id="lt" src="/img/lt.png">
        <ul style="margin-top:6%">
            <li style="height:auto;overflow:hidden;">
                <span style="float:left;">About Sub-Forum Select the Sub-Forum You Wish to Attend Reselect</span><span style="width:auto;float:right;margin-right:10px;background:rgba(221,78,66,0.8);color:#fff;padding:0 5px;height:24px;border-radius:2px;margin-top:3px;" onClick='chong();'>reelect</span>
            </li>
            <li>
                <input type="checkbox" name="Registration[frm][]" data-value=1 value="试验驱动未来网络创新" class="sw" <?= in_array('试验驱动未来网络创新',$model->frm)?'checked':''?>>
                <span class="title">Experiment Drives Innovation of Future Network</span>
                <span class="time">5月12日上午</span>
            </li>
            <li>
                <input type="checkbox" name="Registration[frm][]" data-value=3 value="未来网络学术发展与产业进展" class="qt" <?= in_array('未来网络学术发展与产业进展',$model->frm)?'checked':''?>>
                <span class="title">Future Network Academic Development and Industrial Progress</span>
                <span class="time">5月12日全天</span>
            </li>
            <li>
                <input type="checkbox" name="Registration[frm][]"  data-value=3 value="SDN/NFV技术与应用" class="qt" <?= in_array('SDN/NFV技术与应用',$model->frm)?'checked':''?>>
                <span class="title">SDN/NFV Technology and Application</span>
                <span class="time">5月12日全天</span>
            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=3 value="运营商未来网络变革" class="qt" <?= in_array('运营商未来网络变革',$model->frm)?'checked':''?>>
                <span class="title">Future Network Revolution of Operators</span>
                <span class="time">5月12日全天 </span>

            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=2 value="2018新一代人工智能发展与网络智能服务前沿论坛" class="xw" <?= in_array('2018新一代人工智能发展与网络智能服务前沿论坛',$model->frm)?'checked':''?>>
                <span class="title">Frontier Technology Forum on Next Generation Artificial Intelligence Development and Network Intelligent Service 2018</span>
                <span class="time">5月12日下午</span>

            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=2 value="网络空间大数据" class="xw" <?= in_array('网络空间大数据',$model->frm)?'checked':''?>>
                <span class="title">Big data in cyberspace</span>
                <span class="time">5月12日下午</span>

            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=1 value="物联网/产业互联网" class="sw" <?= in_array('物联网/产业互联网',$model->frm)?'checked':''?>>
                <span class="title">Internet of Things/Industrial Internet</span>
                <span class="time">5月12日上午</span>

            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=1 value="5G网络论坛" class="sw" <?= in_array('5G网络论坛',$model->frm)?'checked':''?>>
                <span class="title">5G Network Internet forum</span>
                <span class="time">5月12日上午</span>

            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=1 value="网络与信息安全" class="sw" <?= in_array('网络与信息安全',$model->frm)?'checked':''?>>
                <span class="title">Network and Information Security</span>
                <span class="time">5月12日上午</span>

            </li>
            <li>

                <input type="checkbox" name="Registration[frm][]" data-value=2 value="全国高校未来网络新工科建设与产学合作论坛" class="xw" <?= in_array('全国高校未来网络新工科建设与产学合作论坛',$model->frm)?'checked':''?>>
                <span class="title">National Forum on the Construction of New Engineering of Future Network and Industry, Education and Research Cooperation for colleges and universities</span>
                <span class="time">5月12日下午</span>

            </li>
        </ul>



</div>
</div>
              

        
         <input id="pre" style="" value="" type="button" onClick="test()"> 
         <input id="submit" style="" value="" type="submit">
        </a> 
 
<input id='submit' value='' type='submit'> 

      <?php ActiveForm::end(); ?>
         
          
        
    </div>
	
	
	   

</body>
</html>
<script>
function test(){
 var fromurl = document.referrer;
 window.location.href=fromurl;
}
lun();
function chong(){
	$('ul li input:checkbox').removeAttr("disabled");
	$('ul li input:checkbox').removeAttr("checked");
  }
function lun(){
  var sum=0;
  $('input[name="Registration[frm][]"]:checked').each(function(){ 
       sum+=$(this).data('value'); 
   }); 
   if(sum==0){
	   $('ul li input:checkbox').removeAttr("disabled");
	}
    if(sum==1){
		$(".sw:not(:checked)").attr("disabled","disabled");
	    $(".qt:not(:checked)").attr("disabled","disabled");
		$('.xw').removeAttr("disabled");
	}
	if(sum==2){
		$(".xw:not(:checked)").attr("disabled","disabled");
	    $(".qt:not(:checked)").attr("disabled","disabled");
		$('.sw').removeAttr("disabled");
	}
	if(sum==3){
		$(".sw:not(:checked)").attr("disabled","disabled");
		$(".xw:not(:checked)").attr("disabled","disabled");
		$(".qt:not(:checked)").attr("disabled","disabled");
	}
}
$('ul li input:checkbox').click(function(){
	lun();
	});

$('#submit').click(function(){
	
	var Registration=$('input:checkbox:checked').val();
	//alert(Registration);
	if(Registration===undefined){
		alert('Please select the sub-forum');return false;
	}
	
	
	$('#form111').submit();
	
	
})



</script>